//
//  StmartBSAppDelegate.m
//  StmartBS
//
//  Created by Sangwon Lee on 10. 9. 10..
//  Copyright __MyCompanyName__ 2010. All rights reserved.
//

#import "StmartBSAppDelegate.h"
#import "EAGLView.h"

@implementation StmartBSAppDelegate

@synthesize window;
@synthesize glView;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [glView startAnimation];
	
	sleep(3);
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
    [glView stopAnimation];
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    [glView startAnimation];
}

- (void)applicationWillTerminate:(UIApplication *)application
{
    [glView stopAnimation];
}

- (void)viewDidload
{
	StartView.alpha = 0.0;
	
	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationDuration:1.0];
	
	StartView.alpha = 1.0;
	
	[UIView commitAnimations];
}

- (IBAction)FadeOut: (id)sender
{
	StartView.alpha = 1.0;
	
	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationDuration:1.0];
	
	StartView.alpha = 0.0;
	
	[UIView commitAnimations];
}

	

- (void)dealloc
{
    [window release];
    [glView release];

    [super dealloc];
}

@end
